package com.tedu;

import java.util.Scanner;

public class Test002 {
    public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入要进行的运算符号");
        String s = scanner.nextLine();
        System.out.println("请输入第一个数");
        int i = scanner.nextInt();
        System.out.println("请输入第二个数");
        int i1 = scanner.nextInt();


        switch (s) {
            case "+":
                add(i, i1);
                break;
            case "-":
                subtraction(i, i1);
                break; //alt  + 回车
            case "*":
                multiplication(i, i1);
                break;
            case "/":
                division(i, i1);
                break;
            case "%":
                remainder(i, i1);
                break;
        }

    }

    private static void remainder (int i, int i1) {
        System.out.println(i % i1);
    }

    private static void division (int i, int i1) {
        System.out.println(i / i1);
    }

    private static void multiplication (int i, int i1) {
        System.out.println(i * i1);
    }

    private static void subtraction (int i, int i1) {
        System.out.println(i - i1);
    }


    public static void add (int i, int i1) {
        System.out.println(i + i1);
    }

}
